The present invention relates generally to the optimization of control settings for compressors and/or regulators in a gas pipeline to transition the gas pipeline from an initial state to a target state.
Present industry technology for minimizing gas transmission cost in a gas pipeline focuses on optimizing the choice of which of available compressor units to run, and determining values for their pressure control set points. Their objective is to minimize the cost of delivering gas at specified rates and locations while satisfying delivery and supply pressure constraints. The problem and its solution are framed in a steady-state context.
When load or supply conditions change, the optimized solution may no longer apply, and a new set of pressure control set points must be determined. Thus, the operator of the pipeline must transit from the current state of the pipeline to provide for the condition changes. For any given state of the pipeline system and the corresponding load or supply condition changes, the question of realizing an optimum of cost and fuel savings during the transition involves two parts: first, what is a new optimum or target state of the pipeline incorporating the load or supply condition changes, and second, what is the optimum path to attain the new optimum state.
There are software applications available that yield an optimum or target steady state mode of operation for projected load and supply conditions. In addition, there are software applications available for determining the current state of a pipeline system. However, no effective solution has been found for determining the optimum path to reach the optimum state of the pipeline for projected load and supply conditions. Because of significant relaxation times (usually many hours) for long gas pipeline systems, substantial fuel cost will be incurred during the transition to the new optimum state. This cost might be large compared with the anticipated savings at the new optimum state if the transition is not made efficiently.
U.S. Pat. No. 4,835,687 to Martin discloses a system for the optimized management of a pipeline system in real time. In Martin, the control for the pipeline is determined by calculating the pressure and flow rates at important system locations and then determining the corresponding equipment, i.e. compressors, valves, etc., to be used to obtain the calculated pressure and flow rates. The control is then tested to determine whether or not it is feasible for the existing equipment. If feasible, an optimization function is computed taking into account certain optimization criteria such as power consumption and flow rates. The optimization function is a linear combination of various optimization criteria each having corresponding coefficients. The higher the coefficient, the more important the optimization criteria. The optimization function is a function of the state vector that represents the pressures, flow rates and adjustments at important system locations. Convergence of the function is checked and the adjustments to the pipeline system are carried out if the function converges. Optimization of the function occurs using a generalized reduced gradient algorithm. Next, the gradient of the downward processing is checked to see if it is zero. If the gradient is not zero, then optimum points for downward processing of the optimization function are determined and the process is repeated. However, the process is not repeated if the achievement of optimization exceeds the possibilities of real-time computation of the system and optimization is deemed impossible.
If the optimization is deemed impossible due to computational resource constraints, then a pre-computed solution is implemented on the pipeline system, which is not an optimal solution and may not match actual loads.
In practice, Martin suffers several deficiencies. The most serious of these is the inventory problem. Briefly, the inventory problem results from reducing costs over the optimizing transition period. A true optimization will leave the pipeline inoperable at the end of the transition period because inventory (pressure) will have been depleted. It is analogous to the grocer who optimizes profits during the month of March by not replacing inventory sold, so he is out of business April 1.
A second deficiency is that Martin does not teach how to efficiently compute the required gradient. Computation of the gradient from basic principles is impractically slow, requiring thousands of times more computer resources than are available for practical size field problems.
A third deficiency is that Martin does not teach the efficient acceleration of the prescribed generalized gradient iteration. This acceleration combined with an efficient gradient evaluation is essential in solving optimizations in field problems faster than real time.
Therefore, what is needed is a system and technique that addresses these deficiencies and does not require the use of precomputed solutions which may only be available for a very limited number of load combination scenarios.
The present invention determines an optimal set of controls for devices in a pipeline to transit the pipeline from an initial state to a target state over a pre-selected time period, T. A set of controls is a collection of numbers corresponding to a discrete set of time values over interval T for each control station or device in the pipeline system. A control station or device might be a compressor or regulator valve station. The state of the pipeline is the set of pressures and gas velocities at a large representative number of points in the pipeline system. These representative points may be the pressures and velocities at each milepost in the system. (A milepost is simply a marker to define pipeline locations on 1-mile spacing). The target state of the pipeline can be computed in two different ways that can be selected by a user. The target state can be computed externally as a steady state for the pipeline, usually an optimum steady state for the loads (gas deliveries) at the end of time interval T. Alternatively, the target state can be an internally computed state required not to change over a final period xcex1T to T, where xcex1 is a suitable number somewhat less than one, but satisfying the prescribed loads at T, and thereby yielding a steady (and thus sustainable) state between xcex1T and T.
The present invention begins by obtaining the initial state of the pipeline from appropriately processed measurements from the field. It generates an initial set of controls and simulates the application of the set of controls on the devices in the pipeline over the pre-selected time period, T, using the initial state information previously obtained and satisfying a set of time-dependent loads (deliveries) at stated points designated throughout the system. The cost for the simulated application of the set of controls is calculated using a cost functional.
A cost functional is a rule for assigning a cost to the set of pipeline states encountered during simulation of the transition from the initial state to time T using a particular control set. For example, at a compressor station the inlet (suction) pressure and discharge velocity and pressure imply a certain theoretical horsepower usage. This theoretical power combined with a machine efficiency and fuel cost imply a cost for the station operation corresponding to this state. Other elements may add to the costs as will be described later. The total cost functional for the simulated period T is the aggregate costs summed over the simulated states achieved during period T.
After the cost for the simulation using a particular control set is calculated, a gradient is determined for that set. The gradient is the vector of numbers comprised of the derivative of the total cost functional with respect to each of the control values in the control set. The set of controls is then modified using the gradient to generate an updated set of controls for the devices in the pipeline. The steps of simulating, calculating, determining and modifying using the updated set of controls are repeated until the updated set of controls is an optimal set of controls. The optimal set of controls is a set of controls that has a minimum cost. Finally, the optimal set of controls is applied to the pipeline to transition the pipeline from the initial state to the target state.
One embodiment of the present invention is directed to a method of formulating an optimal set of controls to transit a pipeline from an initial state to a sustainable target state over a preselected time period. The pipeline comprises a plurality of control devices and the preselected time period has a plurality of discrete intermediate times. First, a set of controls capable of transitioning the pipeline from the initial state to some resulting state at later-time T is chosen. The set of controls has a plurality of control values for each control device of the plurality of control devices and each control value of the plurality of control values for each control device corresponds to a discrete intermediate time of the plurality of discrete intermediate times.
Next, states of the pipeline are simulated using the set of controls from the start of the preselected time period to the end of the preselected time period. The state of the pipeline includes a plurality of state variables representing conditions of the pipeline at discrete points along the pipeline. A total cost for the simulated set of controls is calculated using a cost functional. This cost functional includes a positive value which is a measure of how far the simulated state after time T differs from the required target state or condition. The set of controls is modified to generate an updated set of controls having a lower calculated total cost. Finally, the steps of simulating, calculating, and modifying are repeated with updated sets of controls until the updated set of controls is an optimal set of controls, wherein the optimal set of controls has a minimum total cost and the target state closely approximate.
Another embodiment of the present invention is directed to a method for computing a cost gradient for a control set for use in generating an optimal control set to transit a pipeline from an initial state to a sustainable target state over a preselected time period having a plurality of discrete intermediate times. To begin, a state of the pipeline is simulated at each of the plurality of discrete intermediate times from the start of the preselected time period to the end of the preselected time period using the set of controls. The state of the pipeline has a plurality of state variables representing conditions of the pipeline at discrete points along the pipeline. A cost associated with the state of the pipeline at each of the plurality of discrete intermediate times and at the end of the preselected time period is then calculated. Next, derivatives of the cost associated with the state of the pipeline at each of the plurality of discrete intermediate times and with the state of the pipeline at the end of the preselected time period are evaluated with respect to the plurality of state variables. Beginning at the end of the preselected time period, an adjoint solution is evaluated with the evaluated derivatives and proceeding back to the start of the preselected time period time by incorporating the evaluated derivatives from each of the plurality of discrete intermediate times. Finally, the adjoint solutions evaluated at the plurality of discrete intermediate times from the end of the preselected time period to the start of the preselected time period are combined to generate a cost gradient.
Still another embodiment of the present invention is directed to a method of transitioning a pipeline from a first state to a second state over a predetermined time period. To start, the predetermined time period is divided into a plurality of discrete time segments. A first state of the pipeline is calculated at the start of the predetermined time period. The state of the pipeline has a plurality of state variables representing conditions of the pipeline at discrete points along the pipeline. A second state of the pipeline to be achieved at the end of the predetermined time period is also calculated. A valid and feasible set of controls capable of transitioning the pipeline from the first state of the pipeline to a final state of the pipeline at the end of the predetermined time period is generated. A state of the pipeline at each of the plurality of discrete time segments is simulated from the first state of the pipeline at the start of the predetermined time period to the final state of the pipeline at the end of the predetermined time period using the valid and feasible set of controls. A cost associated with the state of the pipeline is calculated at each of the plurality of discrete time segments and with the final state of the pipeline at the end of the predetermined time period and the costs are then summed to determine a total cost for the valid and feasible set of controls,
Next, first derivatives and second derivatives of the cost associated with the state of the pipeline at each of the plurality of discrete time segments and with the final state of the pipeline at the end of the predetermined time period are evaluated with respect to the plurality of state variables. An adjoint solution with the evaluated first derivatives and proceeding back to the start of the predetermined time period time by incorporating the evaluated first derivatives from each of the plurality of discrete time segments are evaluated beginning at the end of the predetermined time period. The adjoint solutions evaluated at the plurality of discrete time segments from the end of the predetermined time period to the start of the predetermined time period are combined to generate a gradient. The set of controls is then modified using the gradient and the second derivatives to generate an updated set of controls having a lower total cost. Finally, the steps of simulating, calculating, evaluating first and second derivatives, evaluating an adjoint solution, combining the adjoint solutions and modifying with updated sets of controls are repeated until the updated set of controls is an optimal set of controls, wherein the optimal set of controls has a minimum total cost.
Yet another embodiment of the present invention is directed to a computer program product embodied on a computer readable medium and executable by a computer for determining an optimal set of controls for devices in a pipeline to transition the pipeline from a first state to a sustainable second state over a preselected time period. The computer program product includes instructions for executing the steps of dividing the preselected time period into a plurality of discrete intermediate times and generating a valid and feasible set of controls capable of transitioning the pipeline from the first state of the pipeline to a final state of the pipeline at the end of the preselected time period. The computer program product also has instructions for executing the steps of simulating a state of the pipeline at each of the plurality of discrete intermediate times from the first state of the pipeline at the start of the preselected time period to the final state of the pipeline at the end of the preselected time period using the valid and feasible set of controls. The state of the pipeline includes a plurality of state variables representing conditions of the pipeline at discrete points along the pipeline. The computer program product has further instructions for executing the steps of calculating a total cost for the simulated set of controls using a cost functional, computing a gradient of the cost functional, modifying the set of controls using the gradient to generate an updated set of controls having a lower calculated total cost and repeating said steps of simulating, calculating, computing and modifying with updated sets of controls until the updated set of controls is an optimal set of controls, wherein the optimal set of controls has a minimum total cost.
A further embodiment of the present invention is directed to a system for determining an optimal set of control values for control devices in a pipeline to transition the pipeline from a first state to a second state over a predetermined time period. The system includes a plurality of sensors located on the pipeline to measure characteristics of the pipeline and a control and data acquisition system to receive measurements from the plurality of sensors and to apply control values to the control devices of the pipeline. The system also has a pipeline state calculator to generate the first state of the pipeline at the start of the predetermined time period using the measurements received by said control and data acquisition system and a load forecaster to predict future loads at specific points along the pipeline. In addition, the system has a control set optimizer to generate an optimal control set for the control devices of the pipeline. The control set optimizer uses a starting control set, the first state of the pipeline from the pipeline state calculator, the second state of the pipeline and the predicted future loads from the load forecaster to generate said optimal control set. Finally, the optimal control set is transmitted to said control and data acquisition system for application to the control devices of the pipeline.